package com.canaan.business.domain.bill;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.canaan.common.annotation.Excel;
import com.canaan.common.core.domain.BaseEntity;
import com.canaan.common.annotation.TableName;

import javax.validation.constraints.Size;

/**
 * 生产备料申请对象 wms_material_preparation
 *
 * @author huangxs
 * @date 2023-09-13
 */
@ApiModel(description = "wms_material_preparation")
@TableName("wms_material_preparation")
@Data
public class MaterialPreparation extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    @ApiModelProperty("id")
    private Long id;

    /** 编号 */
    @Excel(name = "编号")
    @ApiModelProperty("编号")
    private String no;

    /** 单据状态 1新建 2已确认3进行中 4完成 */
    @Excel(name = "单据状态 1新建 2已确认3进行中 4完成")
    @ApiModelProperty("单据状态 1新建 2已确认3进行中 4完成")
    private Integer orderStatus;

    /** 备料区编号 */
    @Excel(name = "备料区编号")
    @ApiModelProperty("备料区编号")
    private String storehouseAreaNo;

    /** 仓库编号 */
    @Excel(name = "仓库编号")
    @ApiModelProperty("仓库编号")
    private String storehouseNo;

    /** 工单编号 */
    @Excel(name = "工单编号")
    @ApiModelProperty("工单编号")
    @Size(min=5, max=128,message = "工单编号字符长度不能大于128小于5")
    private String workOrderNo;

    /** 工单数量 */
    @Excel(name = "工单数量")
    @ApiModelProperty("工单数量")
    private Long workOrderQty;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("完成时间")
    private Date completeTime;

    /** 是否删除：1是 0否 */
    @ApiModelProperty("是否删除：1是 0否")
    private String delFlag;

    /** 排序 */
    @Excel(name = "排序")
    @ApiModelProperty("排序")
    private Integer sort;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("no", getNo())
            .append("orderStatus", getOrderStatus())
            .append("storehouseAreaNo", getStorehouseAreaNo())
            .append("storehouseNo", getStorehouseNo())
            .append("workOrderNo", getWorkOrderNo())
            .append("workOrderQty", getWorkOrderQty())
            .append("completeTime", getCompleteTime())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime())
            .append("sort", getSort())
            .toString();
    }
}
